<template>
  <div class="goodsDetail">
    <div>
      <div class="mt20">
        <span class="main_active">{{ translate('绑定基站') }}：</span>
        <el-select v-model="formInfo.BSID" class="w400" placeholder="Select">
          <el-option
            v-for="item in BaseStockData"
            :key="item.BSID"
            :label="'[' + item.BSID + ']' + item.BSName"
            :value="item.BSID"
          />
        </el-select>
      </div>
      <div class="mt20">
        <span class="main_active">{{ translate('基站名称') }}：</span>
        <el-input v-model="formInfo.BSName" class="w400" />
      </div>
      <div class="mt20">
        <span class="main_active">{{ translate('屏幕尺寸') }}：</span>
        <el-select v-model="formInfo.LCDType" class="w400" placeholder="Select">
          <el-option
            v-for="item in LCDData"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          />
        </el-select>
      </div>
      <div class="mt20">
        <span class="main_active">{{ translate('标签标识号') }}：</span>
        <el-input v-model="formInfo.UUID" class="w400" type="text" />
      </div>
      <div class="mt20">
        <span class="main_active">{{ translate('MAC地址') }}：</span>
        <el-input v-model="formInfo.ESLCode" class="w400" type="text" />
      </div>
      <div class="mt20">
        <span class="main_active">{{ translate('密钥') }}：</span>
        <el-input v-model="formInfo.ESLCodeOld" class="w400" type="text" />
      </div>
      <div class="mt20">
        <span class="main_active">{{ translate('标签名称') }}：</span>
        <el-input v-model="formInfo.ESLName" class="w400" type="text" />
      </div>
      <div class="mt20">
        <span class="main_active">{{ translate('标签类别') }}：</span>
        <el-select v-model="formInfo.VerNo" class="w400" placeholder="Select">
          <el-option
            v-for="item in VerNoArr"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          />
        </el-select>
      </div>
      <div class="mt20">
        <span class="main_active">{{ translate('条形码') }}：</span>
        <el-input v-model="formInfo.ESLCode2" class="w400" />
      </div>
      <div class="mt20">
        <span class="main_active">{{ translate('硬件版本') }}：</span>
        <el-input
          v-model="formInfo.Version"
          class="w400"
          :placeholder="translate('版本号')"
        />
      </div>
    </div>
  </div>
</template>
<script>
  import { translate } from '@/i18n'
  export default {
    name: 'Detail',
    components: {},
    props: {
      form: {
        type: Object,
        default: () => {
          return {}
        },
      },
      basestockdata: {
        type: Array,
        default: () => {
          return []
        },
      },
    },
    emits: ['deletedchild'],
    data() {
      return {
        translate: translate,
        formInfo: this.form,
        BaseStockData: this.basestockdata,
        VerNoArr: [
          {
            label: '三代',
            value: 3,
          },
          {
            label: '二代',
            value: 2,
          },
          {
            label: '一代',
            value: 1,
          }
        ],
        LCDData: [
          // {
          //   label: '212*104',
          //   value: '00',
          // },
          // {
          //   label: '200*200',
          //   value: '01',
          // },
          // {
          //   label: '296*152',
          //   value: '02',
          // },
          // {
          //   label: '250*122',
          //   value: '03',
          // },
          // {
          //   label: '880*528',
          //   value: '04',
          // },
          // {
          //   label: '300*400',
          //   value: '05',
          // },
          // {
          //   label: '296*128',
          //   value: '06',
          // },
          {
             label: '4.2(300*400)',
             value: '4.2',
          },
          {
             label: '2.9(296*128)',
             value: '2.9',
          },
          {
             label: '2.13(250*128)',
             value: '2.13',
          },
          {
             label: '7.5(480*800)',
             value: '7.5',
          },
          {
             label: '2.66(296*152)',
             value: '2.66',
          },
          {
             label: '1.54(152*152)',
             value: '1.54',
          },
          {
             label: '5.8(480*648)',
             value: '5.8',
          }
        ],
      }
    },
    watch: {
      form(val) {
        this.formInfo = val
      },
    },
    methods: {},
  }
</script>
<style lang="scss" scoped>
  .goodsDetail {
    height: 450px;
  }
  .flex_align {
    display: flex;
    align-items: center;
  }
  .tableDetail {
    padding: 10px;
    .button-add {
      text-align: end;
      padding: 10px;
    }
  }
  .main_active {
    display: inline-block;
    width: 120px;
    text-align: right;
  }
  .mr20 {
    margin-right: 20px;
  }

  .w400 {
    width: 400px !important;
  }
  .mt20 {
    margin-top: 10px;
  }
  .mr10 {
    margin-right: 10px;
  }
  .mb10 {
    margin-bottom: 10px;
  }
  .w320 {
    width: 320px;
  }
  ::v-deep .el-scrollbar__wrap {
    overflow-x: auto;
    height: calc(100% + 20px); //多出来的20px是横向滚动条默认的样式
  }
  ::v-deep .el-scrollbar .el-scrollbar__wrap .el-scrollbar__view {
    white-space: nowrap;
    display: inline-block;
  }
  ::v-deep .el-table--scrollable-x .el-table__body-wrapper {
    overflow-x: hidden;
  }
  ::v-deep input[type='number']::-webkit-inner-spin-button,
  ::v-deep input[type='number']::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
  }
</style>
